<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>物料管理-添加产品</title>
<link href="/examine/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="/examine/Public/admin/js/jquery.js"></script>

<link href="/examine/Public/admin/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/examine/Public/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="/examine/Public/admin/js/select-ui.min.js"></script>

<link href="/examine/Public/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/examine/Public/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="/examine/Public/validform/Validform_Datatype.js"></script>
<script>
$(document).ready(function(e) {
    $("#role,#level").uedSelect({
		width : 345			  
	});
});
</script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="<?php echo U('index/welcome');?>">首页</a></li>
			<li><a href="<?php echo U('product/detail');?>">检验结果</a></li>
			<li><a href="#">快速添加</a></li>
		</ul>
    </div>
    
    <div class="formbody">
    
		<div class="formtitle"><span>添加产品</span></div>
 
		<form name="myform" id="myform" action="<?php echo U('product/add');?>" method="post">
			<ul class="forminfo">
				<li><label>S/N编码</label><input name="info[sncode]"   type="text" class="dfinput" value="<?php echo ($sncode); ?>" readonly/></li>
				<input type='hidden' name="info[mat_id]" value="<?php echo ($mat["mat_id"]); ?>">
				<li><label>物料</label><input  type="text" class="dfinput" value="<?php echo ($mat["mat_title"]); ?>" readonly/></li>
				<li><label>箱号</label><input name="info[cncode]"   type="text" class="dfinput" datatype="*" errormsg="箱号不能为空！" maxlength="20" /><i class="Validform_checktip"></i></li>
				<li><label>检验员</label>
					<div class="vocation">
						<select id="role" name="info[admin_id]" datatype="*" errormsg="不能为空">
							<option value="">选择检验员</option>
							<?php if(is_array($admininfo)): $i = 0; $__LIST__ = $admininfo;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?><option value="<?php echo ($data["admin_id"]); ?>"><?php echo ($data["realname"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
						</select>
					</div>
					<i class="Validform_checktip"></i>
				</li>
				<li><label>级别</label>
					<div class="vocation">
						<select id="level" name="info[level_id]" datatype="*" errormsg="不能为空">
							<option value="">选择级别</option>
							<?php if(is_array($levels)): $i = 0; $__LIST__ = $levels;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$data): $mod = ($i % 2 );++$i;?><option value="<?php echo ($data["level_id"]); ?>"><?php echo ($data["level_title"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
						</select>
					</div>
					<i class="Validform_checktip"></i>
				</li>
				<li><label>现象描述</label><textarea name="info[remarks]" id="remarks"  cols="" rows="" class="textinput" style="height: 50px;" datatype="*" errormsg="现象描述简介，简单明了！" maxlength="255"></textarea><i class="Validform_checktip"></i></li> 
				<li><label>&nbsp;</label><input type="submit" class="btn" value="确认保存"/></li>
			</ul>
		</form>
    
    </div>

	<script>
	$(function(){
		$("#myform").Validform({
			//tiptype:2
			tiptype:function(msg,o,cssctl){
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		});
	}); 
	</script>
</body>

</html>